<%--
  Created by IntelliJ IDEA.
  User: Dell
  Date: 2021/11/16
  Time: 10:30
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%String path = request.getContextPath();%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>更改管理员密码</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />

    <link rel="stylesheet" href="<%=path %>/web/index/css/font.css">
    <link rel="stylesheet" href="<%=path %>/web/index/css/xadmin.css">
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <script type="text/javascript" src="<%=path %>/web/index/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="<%=path %>/web/index/js/xadmin.js"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

    <script type="text/javascript">
        function check_form(){
            var oldpwd = document.getElementById("oldpwd").value;
            var password = document.getElementById("password").value;
            var prepwd = document.getElementById("prepwd").value;
            if(oldpwd==""){
                alert("系统提示：填写不规范（旧密码 不能为空！请检查……）");
                return false;
            }
            if(password==""){
                alert("系统提示：填写不规范（新密码 不能为空！请检查……）");
                return false;
            }
            if(password!=prepwd){
                alert("系统提示：填写不规范（两次密码不一致！请检查……）");
                return false;
            }
        }

        function check_msg(){
            var msg = '${b}';
            if(msg=="true"){
                alert("系统提示：修改数据成功！即将返回列表……");
            }if(msg=="false"){
                alert("系统提示：修改数据失败！请检查……");
            }if(msg=="error"){
                alert("系统提示：旧密码填写不正确！请检查……");
            }
        }

    </script>





</head>

<body onload="check_msg()">
<div class="x-nav">
      <span class="layui-breadcrumb">
        <a>
          <cite>密码修改</cite></a>
      </span>
</div>
<div class="x-body">
    <h1 ><strong style="font-size: 25px;">密码修改</strong></h1>
    <form action="managers_password_pre_update" method="post" onsubmit="return check_form()">


        <table class="layui-table">
            <tr>
                <th style="text-align: right;">旧密码：</th>
                <td style="width: 200px;"><input type="password" name="oldpwd" id="oldpwd"  autocomplete="off"  class="layui-input"/></td>
                <td style="color: red;">*必填项</td>
            </tr>

            <tr>
                <th style="text-align: right;">新密码：</th>
                <td style="width: 200px;"><input type="password" name="password" id="password"  autocomplete="off"  class="layui-input"/></td>
                <td style="color: red;">*必填项</td>
            </tr>

            <tr>
                <th style="text-align: right;">新密码确认：</th>
                <td style="width: 200px;"><input type="password" name="prepwd" id="prepwd"  autocomplete="off"  class="layui-input"/></td>
                <td style="color: red;">*必填项</td>
            </tr>

            <tr>
                <td colspan="3" style="text-align: center;">
                    <button class="layui-btn"  lay-submit="" lay-filter="sreach" type="submit">密码修改</button>
                </td>
            </tr>

        </table>
    </form>
</div>

</body>

</html>
